package com.kuang.operator;
public class Demo09 {
    public static void main(String[] args) {

        int [] str={19,59,74,28,39,85,29};
        int lean = str.length;
        int w;
        for (int i=0;i<lean;i++){
            for(int j=0;j<lean-i-1;j++){
                if (str[j]>str[j+1]){
                    w=str[j];
                    str[j]=str[j+1];
                    str[j+1]=w;
                }
            }
        }
        System.out.println("冒泡排序后:");
        for (int i=0;i<lean;i++){
            System.out.print(str[i]+" ");
        }
    }
}
